
<script src="__TMPL__/public/assets/js/jquery-1.10.2.min.js"></script>
<script src="__TMPL__/public/assets/layui/layui.js"></script>
<script src="__STATIC__/js/laydate.js"></script>
<link  href="__TMPL__/public/assets/layui/css/layui.css" rel="stylesheet">
<script src="__STATIC__/js/echarts.min.js"></script>
<script>
    layui.use('laydate', function(){
        var laydate = layui.laydate;
        //执行一个laydate实例
        laydate.render({
            elem: '#test5' //指定元素
        });
        laydate.render({
            elem: '#test3' //指定元素
        });
    });
</script>

<style>
    .help-block{
        font-size: 12px !important;color: #777777;
    }
</style>

<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md8">


            <form class="layui-form" action=""  lay-filter="example" style="padding-top: 20px" >


                <div class="layui-form-item">
                    <label class="layui-form-label">收件人</label>
                    <div class="layui-input-block">
                        <input type="text" name="name"  value="{$info.name}" lay-verify="title" autocomplete="off" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">快递单号</label>
                    <div class="layui-input-block">
                        <input type="text"  name="kdnum" value="{$info.kdnum}" lay-verify="title" autocomplete="off" class="layui-input">
                    </div>
                </div>


                <div class="layui-form-item">
                    <label class="layui-form-label">产品信息</label>
                    <div class="layui-input-block">
                        <select name="goods" lay-filter="types">
                            <volist name="goods" id="good">

                                <option value="{$good}" <if condition="$info['goods'] eq $good">selected </if>>{$good}</option>

                            </volist>
                        </select>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">地址</label>
                    <div class="layui-input-block">
                        <input type="text" name="address" value="{$info.address}" lay-verify="order" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">状态1</label>
                    <div class="layui-input-block">
                        <select name="status" lay-filter="types">
                        <option value="0" <if condition="$info['status'] neq 1"> selected </if>>未入库</option>
                        <option value="1" <if condition="$info['status'] eq 1">selected </if>>已入库</option>
                        </select>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">支付方式</label>
                    <div class="layui-input-block">
                        <select name="zf" lay-filter="types">
                            <option value="1" <if condition="$info['zf'] eq 1"> selected </if>>代付</option>
                            <option value="0" <if condition="$info['zf'] eq 0">selected </if>>自付</option>
                        </select>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">出库时间</label>
                    <div class="layui-input-block">
                        <input type="text" class="layui-input" name="chukutime" value="{$info.chukutime}" id="test5" placeholder="yyyy-MM-dd">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">出库地址</label>
                    <div class="layui-input-block">
                        <input type="text" name="address" value="{$info.address}" lay-verify="order" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">出库单号</label>
                    <div class="layui-input-block">
                        <input type="text" name="chuorder" value="{$info.chuorder}" lay-verify="order" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">回款时间</label>
                    <div class="layui-input-block">
                        <input type="text" class="layui-input" name="huikuantime" value="{$info.huikuantime}" id="test3" placeholder="yyyy-MM-dd">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">回款金额</label>
                    <div class="layui-input-block">
                        <input type="text" name="huikuanmoney" value="{$info.huikuanmoney}"  lay-verify="order" class="layui-input">
                    </div>
                </div>


                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button type="button" class="layui-btn" id="LAY-component-form-getval" lay-submit="" lay-filter="demo1">立即提交</button>

                    </div>
                </div>
            </form>

            <script>
                layui.use(['form', 'util', 'laydate'], function() {
                    var form = layui.form;
                    var layer = layui.layer;
                    var util = layui.util;
                    var laydate = layui.laydate;

                    //表单取值
                    layui.$('#LAY-component-form-getval').on('click', function () {
                        var data = form.val('example');

                        // var data=JSON.stringify(data);

                        console.log(data);

                        $.ajax({
                            url: '',
                            data: data,
                            type:'post',
                            success:function (res){
                                layer.msg(res.msg);

                                if (res.code==1){
                                    location.reload();
                                }


                            }
                        })




                    });
                })

            </script>



        </div>
    </div>
</div>